<template>
  <div class="canshu">
    <h2>商品参数</h2>
    <ul>
      <li v-for="item in attrib" :key="item.name">
        <span>{{ item.name }}:</span>
        <strong class="van-ellipsis">{{ item.value }}</strong>
      </li>
    </ul>
    <div class="desc" v-html="goodsdesc"></div>
  </div>
</template>

<script>
export default {
  props: ["attrib", "goodsdesc"],
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style lang="less">
.canshu {
  background-color: #fff;
  padding: 0.1rem;
  margin: 0.1rem 0;
  .desc {
    width: 100%;
    p {
      margin: 0;
      img {
        width: 100%;
        display: block;
      }
    }
  }
  h2 {
    color: #000;
    font-size: 0.22rem;
    line-height: 40px;
  }
  ul {
    li {
      background-color: #f0f0f0;
      padding: 0.04rem;
      color: #333;
      font-size: 0.14rem;
      height: 30px;
      line-height: 30px;
      border-radius: 3px;
      margin: 0.04rem 0;
      display: flex;
      span {
        display: inline-block;
        color: #666;
        width: 1rem;
        padding-left: 0.05rem;
        box-sizing: border-box;
        text-align: right;
      }
      strong {
        color: #333;
        padding-left: 0.06rem;
        color: #333;
        width: 0.5rem;
        // border:1px solid red;
        flex: 1;
      }
    }
  }
}
</style>
